home *** CD-ROM | disk | FTP | other *** search
/ Minami 78 / MINAMI78.iso / Extra / winamp53.exe / $R0 / Winamp Modern / scripts / vis.m < prev    next >
Text File  |  2005-09-15  |  936b  |  42 lines

  1. #include <lib/std.mi>
  2. #include "attribs.m"
  3.  
  4. Function updateVisCmd();
  5.  
  6. Global Button btnVisReattach;
  7. Global Layout thislayout;
  8. Global Int evershown;
  9.  
  10. System.onScriptLoaded() {
  11.     initAttribs();
  12.     thislayout = getScriptGroup().getParentLayout();
  13.     BtnVisReattach = getScriptGroup().findObject("button.vis.reattach");
  14. }
  15.  
  16. thisLayout.onSetVisible(int show) {
  17.     if (!evershown) {
  18.         evershown = 1;
  19.         updateVisCmd();
  20.     }
  21. }
  22.  
  23. BtnVisReattach.onLeftClick() {
  24.   Container c = getContainer("main");
  25.   if (c.getLayout("shade").isVisible()) c.switchToLayout("normal");
  26.   vis_detach_attrib.setData("0");
  27. }
  28.  
  29. viscmd_menu_attrib.onDataChanged() {
  30.   updateVisCmd();
  31. }
  32.  
  33. updateVisCmd() {
  34.   Button btn = getScriptGroup().findObject("button.vis.misc");
  35.   if (btn) {
  36.     if (viscmd_menu_attrib.getData() == "1") {
  37.       btn.setXmlParam("action", "Vis_Menu");
  38.     } else {
  39.       btn.setXmlParam("action", "Vis_Cfg");
  40.     }
  41.   }
  42. }